<template>
  <div class="edit">
    <div class="header">
        <div class="jiantou" @click="editaddress"> < 返回</div>
        <div class="address">编辑地址</div>
        <table>
            <tr>
                <td class="tdd">联系人</td>
                <td>
                    <input type="text" placeholder="">{{user.id}}
                </td>
            </tr>
            <tr>
                <td></td>
                <td>
                    <input type="radio" name="gender">男
                    <input type="radio" name="gender" >女
                </td>
            </tr>
            <tr>
                <td class="tdd">电话</td>
                <td>
                    <input type="text" placeholder="手机号码" >
                </td>
            </tr>
            <tr>
                <td class="tdd">地址</td>
                <td>
                    <input type="text" placeholder="选择收货地址" >
                </td>
            </tr>
            <tr>
                <td class="tdd">门牌号</td>
                <td>
                    <input type="text" placeholder="例:5号楼203室">
                </td>
            </tr>
            <tr>
                <td class="tdd">标签</td>
                <td>
                    <input type="radio" name="address" >家
                    <input type="radio" name="address">学校
                    <input type="radio" name="address">公司
                </td>
            </tr>
        </table>
        <input type="submit" value="删除" class="get" @click="deleteaddress()">
        <input type="submit" value="确定" class="set" >
    </div>
  </div>
</template>

<script>
import { address_edit } from '@/utils/api'
export default {
    data(){
        return{
            user:{
                name:'',
                tel:'',
                addre:'',
                item:this.$route.params.item
            }
           
        }
    },

   methods:{
    addAddress(){
        address_edit({userid:'17339812773',address:this.user.addre,name:this.user.name,phone:this.user.tel}).then((res)=>{
            alert(res.data.msg)

        })
    },
    editaddress(){
        this.$router.push('/address');
    },
    deleteaddress(){
        if(confirm("确定删除该收货地址嘛？")){
        }
    }
   }
}
</script>

<style>
.header .jiantou{
    color: skyblue;
    font-size: 20px;
    float: left;
    margin: 15px 10px;
}
.header .address{
    font-size: 20px;
    font-weight: bold;
    padding-top: 20px;
    margin-left: 150px;
}
.tdd{
    font-size:15px ;
    color: gray;
    font-weight: bold;
}
td input{
    color: #E3E4E5;
}
table tr{
    height: 50px;
}
.get{
    border: none;
    width: 100px;
    margin-left: 80px;
    background-color: orange;
}
.set{
    width: 100px;
    border: none;
    margin-left: 20px;
    background-color: skyblue;
}
input{
    border: none;
    border-bottom: 1px solid gray;
}
</style>